package com.aaa.controller.scl;

import com.aaa.controller.BaseController;
import com.aaa.entity.Result;
import com.aaa.entity.scl.ViewTestResultSclTotal;
import com.aaa.service.scl.ViewTestResultSclService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

import java.util.List;

/**
 * @author ：Teacher马（2508531326@qq.com）
 * @date ：Created in 2022/9/6 19:00
 * @description：
 * @modified By：
 * @version:
 */
@RestController
@RequestMapping("sclLastController")
public class SclLastController  extends BaseController {
    @Autowired
    ViewTestResultSclService viewTestResultSclService;


    @RequestMapping("queryAll.do")
    public Result queryAll(){
        List<ViewTestResultSclTotal> viewTestResultSclTotals = viewTestResultSclService.queryAllScl();
        for (ViewTestResultSclTotal viewTestResultSclTotal : viewTestResultSclTotals) {
            return  success(viewTestResultSclTotal);
        }
        return  fail();
    }
    @RequestMapping("sclLast.do")
    public ModelAndView sdsLast(ModelAndView modelAndView){
        modelAndView.setViewName("scl/sclLast");
        return  modelAndView;
    }
}

